package prictise.com.application1.transitionAnimation;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;

import prictise.com.application1.BaseActivity;
import prictise.com.application1.R;

public class TransitionAnimationActivity2 extends BaseActivity {
  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_transition_animation2);
    ImageView iv = findViewById(R.id.iv_2);
    Glide.with(this)
            .load("https://alifei05.cfp.cn/creative/vcg/800/new/VCG211323585460.jpg")
            .apply(new RequestOptions().placeholder(R.drawable.ic_pause)
                    .diskCacheStrategy(DiskCacheStrategy.RESOURCE))
            .into(iv);

    iv.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
        ActivityCompat.finishAfterTransition(TransitionAnimationActivity2.this);
      }
    });
  }
}
